package com.scau.ums.mapper;

import com.scau.ums.model.News;
import com.scau.ums.util.dao.NewsSql;
import com.scau.ums.util.dao.SelectByPageSql;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;


public interface CustomedNewsMapper {
    @InsertProvider(method = "InsertNews",type = com.scau.ums.util.dao.NewsSql.class)
    public int InsertNews(News schoolnews);
    //截取特定序列的新闻
    @SelectProvider(method="SelectNews",type = com.scau.ums.util.dao.NewsSql.class)
    public List<News> SelectNews();
    @SelectProvider(method = "selectRowByPageSetOrderByClause",type= SelectByPageSql.class)
    public List<News> selectRowByPageSetOrderByClause
            (String table, String orderClause, int startIndex, int pageSize,String whereClause);
    @SelectProvider(method="countNews",type=com.scau.ums.util.dao.NewsSql.class)
    public int getNewsSum();
}
